﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Frontend/Frontend.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<IntroduceCompany.Image>>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
    Galleria.loadTheme('../../../Content/Frontend/libraries/album/themes/stapleford/galleria.stapleford.js');
    $('#galleria').galleria();
</script>

<% if (ViewData["AlbumName"] != "")
   { %>

   <table border="0" cellpadding="0" cellspacing="0" width="100% ;">
    <tr>
        <td class="col-left bg_product">
            <% Html.RenderPartial("/Views/Frontend/Album/Left.ascx"); %>
        </td>
        <td class="col-center">
            <div class="albumdetails">
                <h2> <%= Html.Encode(ViewData["AlbumName"]) %></h2>
                <div id="galleria">
               
                    <% foreach (var item in Model)
                       { %>
                            <a href="../../../Image/Album/album-<%= item.AlbumID%>/photo/<%= item.ImageName%>">
            	                <img src="../../../Image/Album/album-<%= item.AlbumID%>/photo/thumbnail/<%= item.ImageName %>" alt="<%= ViewData["AlbumName"]%>" />
        	                </a>
                    <% } %>
                </div>
            </div>  
             <%  string[] roleList = IntroduceCompany.Util.ConstantClass.autAlbum.Split(',');
                 foreach (string roleID in roleList)
                 {
                     if (Context.User.IsInRole(roleID))
                     { %>
                <div>
                <a href="<%= Url.Action("Edit", "Album", new { albumID = ViewData["albumID"], languageID = ViewData["languageID"]}) %>" target="_blank">
                    [Chỉnh sửa] </a>
                </div>
                <%       break;
                     }
                 }%>          
        </td>
    </tr>
</table>

<%}%>


</asp:Content>